/**
 * Cropmarks define the region within an image that will be cropped. They appear
 * in the image dialog when crop is active.
 */

.ct-widget {

    .ct-crop-marks {
        height: 320px;
        left: 73px;
        position: absolute;
        top: 0;
        width: 427px;

        /**
         * The clipper is used to prevent the rulers extending outside of the
         * image.
         */
        &__clipper {
            height: 100%;
            overflow: hidden;
            position: relative;
            width: 100%;
        }

        /**
         * The cropping region is defined by 2 L shaped framing rulers at
         * opposite corners.
         */
        &__ruler {

            &--top-left {
                position: absolute;

                &:after {
                    border: 1px solid rgba(white, 0.5);
                    border-bottom: none;
                    border-right: none;
                    box-shadow:
                        -1px -1px 1px rgba(black, 0.25),
                        inset 1px 1px 1px rgba(black, 0.25)
                        ;
                    content: '';
                    height: 999px;
                    left: 0;
                    position: absolute;
                    top: 0;
                    width: 999px;
                }
            }

            &--bottom-right {
                position: absolute;

                &:after {
                    border: 1px solid rgba(white, 0.5);
                    border-top: none;
                    border-left: none;
                    bottom: 0;
                    box-shadow:
                        1px 1px 1px rgba(black, 0.25),
                        inset -1px -1px 1px rgba(black, 0.25)
                        ;
                    content: '';
                    height: 999px;
                    position: absolute;
                    right: 0;
                    width: 999px;
                }
            }
        }

        /**
         * The rulers defing the crop region can be moved by the user, handles
         * provide a draggable handle for each ruler.
         */
        &__handle {
            background: #2980b9;
            border: 1px solid lighten(#2980b9, 10%);
            border-radius: 7px;
            cursor: pointer;
            height: 15px;
            margin-left: -7px;
            margin-top: -7px;
            position: absolute;
            width: 15px;

            &--bottom-right {
                margin-left: -8px;
                margin-top: -8px;
            }

            &:hover {
                background: lighten(#2980b9, 5%);
            }
        }
    }

}